package com.baosight.sczx.zm.ch.service;

import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.ep.ServiceEPBase;
import com.baosight.sczx.common.zm.basetools.StaticTools;
import com.baosight.sczx.zm.cp.domain.ZMCPProducePlanYT;
/**
 * 旬报
 */
public class ServiceZMCH9001 extends ServiceEPBase {
	/**
	 * <p>Function: initLoad</p>
	 * <p>Description: 初始化</p> 
	 */
	@Override
	public EiInfo initLoad(EiInfo inInfo) {
		inInfo.addBlock(EiConstant.resultBlock).set("showCount", "true");//如果不加这个，翻页的统计和显示是错误的 	
		EiInfo outInfo = this.query(inInfo);
		
//		outInfo.addBlock(Department.getInstance().getConstructionUnit("cmes.cp.department", "orgCode", "orgName", false));
		return outInfo;
	}
	public EiInfo query(EiInfo inInfo) 
	{
		String fdProfessionalplanId = inInfo.getString("keyId");
		StaticTools.setQueryParameters(inInfo, "fdProfessionalplanId", fdProfessionalplanId, true);

		EiInfo outInfo = super.query(inInfo, "ZMCPProducePlanYT.query", new ZMCPProducePlanYT());		
//		EiInfo outInfo = super.query(inInfo, "ZMCPProduceplanYt.query", new ZMCPProduceplanYt());
//		outInfo.addBlock(Department.getInstance().getConstructionUnit("cmes.cp.department", "orgCode", "orgName", false));
		return outInfo;
	}	
} 